/// 推荐数据
class RecommendData {
  String? _title;
  String? _type;
  RecommendInfo? _recommendInfo;
  List<VideoInfoData>? _videoInfo;
  List<Channel>? _channel;
  List<Sancan>? _sancan;
  List<Zhuanti>? _zhuanti;

  RecommendData(
      {String? title,
      String? type,
      RecommendInfo? recommendInfo,
      List<VideoInfoData>? videoInfo,
      List<Channel>? channel,
      List<Sancan>? sancan,
      List<Zhuanti>? zhuanti}) {
    this._title = title;
    this._type = type;
    this._recommendInfo = recommendInfo;
    this._videoInfo = videoInfo;
    this._channel = channel;
    this._sancan = sancan;
    this._zhuanti = zhuanti;
  }

  String? get title => _title;

  RecommendData.fromJson(Map<String, dynamic> json) {
    _title = json['title'];
    _type = json['type'];
    _recommendInfo = json['recommend_info'] != null
        ? new RecommendInfo.fromJson(json['recommend_info'])
        : null;
    if (json['video_info'] != null) {
      _videoInfo = [];
      json['video_info'].forEach((v) {
        _videoInfo!.add(new VideoInfoData.fromJson(v));
      });
    }
    if (json['channel'] != null) {
      _channel = [];
      json['channel'].forEach((v) {
        _channel!.add(new Channel.fromJson(v));
      });
    }
    if (json['sancan'] != null) {
      _sancan = [];
      json['sancan'].forEach((v) {
        _sancan!.add(new Sancan.fromJson(v));
      });
    }
    if (json['zhuanti'] != null) {
      _zhuanti = [];
      json['zhuanti'].forEach((v) {
        _zhuanti!.add(new Zhuanti.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this._title;
    data['type'] = this._type;
    if (this._recommendInfo != null) {
      data['recommend_info'] = this._recommendInfo!.toJson();
    }
    if (this._videoInfo != null) {
      data['video_info'] = this._videoInfo!.map((v) => v.toJson()).toList();
    }
    if (this._channel != null) {
      data['channel'] = this._channel!.map((v) => v.toJson()).toList();
    }
    if (this._sancan != null) {
      data['sancan'] = this._sancan!.map((v) => v.toJson()).toList();
    }
    if (this._zhuanti != null) {
      data['zhuanti'] = this._zhuanti!.map((v) => v.toJson()).toList();
    }
    return data;
  }

  String? get type => _type;

  RecommendInfo? get recommendInfo => _recommendInfo;

  List<VideoInfoData>? get videoInfo => _videoInfo;

  List<Channel>? get channel => _channel;

  List<Sancan>? get sancan => _sancan;

  List<Zhuanti>? get zhuanti => _zhuanti;
}

class RecommendInfo {
  String? _recommendText;

  RecommendInfo({String? recommendText}) {
    this._recommendText = recommendText;
  }

  String? get recommendText => _recommendText;

  RecommendInfo.fromJson(Map<String, dynamic> json) {
    _recommendText = json['recommend_text'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['recommend_text'] = this._recommendText;
    return data;
  }
}

class VideoInfoData {
  String? _id;
  String? _title;
  String? _date;
  String? _recommendTitle;
  String? _jump;
  Video? _video;
  Author? _author;

  VideoInfoData(
      {String? id,
      String? title,
      String? date,
      String? recommendTitle,
      String? jump,
      Video? video,
      Author? author}) {
    this._id = id;
    this._title = title;
    this._date = date;
    this._recommendTitle = recommendTitle;
    this._jump = jump;
    this._video = video;
    this._author = author;
  }

  String? get id => _id;

  VideoInfoData.fromJson(Map<String, dynamic> json) {
    _id = json['id'];
    _title = json['title'];
    _date = json['date'];
    _recommendTitle = json['recommend_title'];
    _jump = json['jump'];
    _video = json['video'] != null ? new Video.fromJson(json['video']) : null;
    _author =
        json['author'] != null ? new Author.fromJson(json['author']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this._id;
    data['title'] = this._title;
    data['date'] = this._date;
    data['recommend_title'] = this._recommendTitle;
    data['jump'] = this._jump;
    if (this._video != null) {
      data['video'] = this._video!.toJson();
    }
    if (this._author != null) {
      data['author'] = this._author!.toJson();
    }
    return data;
  }

  String? get title => _title;

  String? get date => _date;

  String? get recommendTitle => _recommendTitle;

  String? get jump => _jump;

  Video? get video => _video;

  Author? get author => _author;
}

class Video {
  String? _vendorVideo;
  String? _img;
  String? _imgTest;
  int? _width;
  int? _height;

  Video(
      {String? vendorVideo,
      String? img,
      String? imgTest,
      int? width,
      int? height}) {
    this._vendorVideo = vendorVideo;
    this._img = img;
    this._imgTest = imgTest;
    this._width = width;
    this._height = height;
  }

  String? get vendorVideo => _vendorVideo;

  Video.fromJson(Map<String, dynamic> json) {
    _vendorVideo = json['vendor_video'];
    _img = json['img'];
    _imgTest = json['img_test'];
    _width = json['width'];
    _height = json['height'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['vendor_video'] = this._vendorVideo;
    data['img'] = this._img;
    data['img_test'] = this._imgTest;
    data['width'] = this._width;
    data['height'] = this._height;
    return data;
  }

  String? get img => _img;

  String? get imgTest => _imgTest;

  int? get width => _width;

  int? get height => _height;
}

class Author {
  String? _id;
  String? _nickname;
  String? _avatarUrl;

  Author({String? id, String? nickname, String? avatarUrl}) {
    this._id = id;
    this._nickname = nickname;
    this._avatarUrl = avatarUrl;
  }

  String? get id => _id;

  Author.fromJson(Map<String, dynamic> json) {
    _id = json['id'];
    _nickname = json['nickname'];
    _avatarUrl = json['avatar_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this._id;
    data['nickname'] = this._nickname;
    data['avatar_url'] = this._avatarUrl;
    return data;
  }

  String? get nickname => _nickname;

  String? get avatarUrl => _avatarUrl;
}

class Channel {
  String? _title;
  String? _desc;
  String? _img;
  String? _jump;

  Channel({String? title, String? desc, String? img, String? jump}) {
    this._title = title;
    this._desc = desc;
    this._img = img;
    this._jump = jump;
  }

  String? get title => _title;

  Channel.fromJson(Map<String, dynamic> json) {
    _title = json['title'];
    _desc = json['desc'];
    _img = json['img'];
    _jump = json['jump'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this._title;
    data['desc'] = this._desc;
    data['img'] = this._img;
    data['jump'] = this._jump;
    return data;
  }

  String? get desc => _desc;

  String? get img => _img;

  String? get jump => _jump;
}

class Sancan {
  String? _title;
  List<Items>? _items;
  String? _type;

  Sancan({String? title, List<Items>? items, String? type}) {
    this._title = title;
    this._items = items;
    this._type = type;
  }

  String? get title => _title;

  Sancan.fromJson(Map<String, dynamic> json) {
    _title = json['title'];
    if (json['items'] != null) {
      _items = [];
      json['items'].forEach((v) {
        _items!.add(new Items.fromJson(v));
      });
    }
    _type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this._title;
    if (this._items != null) {
      data['items'] = this._items!.map((v) => v.toJson()).toList();
    }
    data['type'] = this._type;
    return data;
  }

  List<Items>? get items => _items;

  String? get type => _type;
}

class Items {
  String? _id;
  String? _title;
  String? _titlePinyin;
  String? _img;
  String? _desc;

  Items(
      {String? id,
      String? title,
      String? titlePinyin,
      String? img,
      String? desc}) {
    this._id = id;
    this._title = title;
    this._titlePinyin = titlePinyin;
    this._img = img;
    this._desc = desc;
  }

  String? get id => _id;

  Items.fromJson(Map<String, dynamic> json) {
    _id = json['id'];
    _title = json['title'];
    _titlePinyin = json['title_pinyin'];
    _img = json['img'];
    _desc = json['desc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this._id;
    data['title'] = this._title;
    data['title_pinyin'] = this._titlePinyin;
    data['img'] = this._img;
    data['desc'] = this._desc;
    return data;
  }

  String? get title => _title;

  String? get titlePinyin => _titlePinyin;

  String? get img => _img;

  String? get desc => _desc;
}

class Zhuanti {
  String? _type;
  String? _img;
  String? _title;
  String? _jump;

  Zhuanti({String? type, String? img, String? title, String? jump}) {
    this._type = type;
    this._img = img;
    this._title = title;
    this._jump = jump;
  }

  String? get type => _type;

  Zhuanti.fromJson(Map<String, dynamic> json) {
    _type = json['type'];
    _img = json['img'];
    _title = json['title'];
    _jump = json['jump'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this._type;
    data['img'] = this._img;
    data['title'] = this._title;
    data['jump'] = this._jump;
    return data;
  }

  String? get img => _img;

  String? get title => _title;

  String? get jump => _jump;
}
